package com.huidao.ui;

import java.util.Scanner;

import com.huidao.service.VipCardService;

public class VipCardMenu {
	private static final int STOP = 1;
	private static final int VIPREGIST = 1;
	private static final int VIPDEL = 2;
	private static final int RECHARGE = 3;
	private static Scanner sc = new Scanner(System.in);
	public void operation(){
		System.out.println("--------会员卡管理------");
		System.out.println("请输入您要执行的操作：1-->注册会员卡，2-->删除会员卡，3-->会员卡充值");
		int operation = sc.nextInt();
		switch (operation) {
		case VIPREGIST:{
			while(true){
				System.out.println("停止VIP界面操作请输入1");
				if (sc.nextInt()==STOP) {
					break;
				}
			}
			new VipCardService().vipRegist();
			break;
		}
		case VIPDEL:{
			while(true){
				System.out.println("停止VIP界面操作请输入1");
				if (sc.nextInt()==STOP) {
					break;
				}
			new VipCardService().vipDel();
			break;
			}
		}
		case RECHARGE:{
			while(true){
				System.out.println("停止VIP界面操作请输入1");
				if (sc.nextInt()==STOP) {
					break;
				}
			new VipCardService().Recharge();
			break;
			}
		}
		default:
			break;
		}
	}
}
